USE DeltaFlex
GO
IF ( OBJECT_ID('dbo.sp_InsertarConcepte_OT') IS NOT NULL ) 
   DROP PROCEDURE dbo.sp_InsertarConcepte_OT
GO

CREATE PROCEDURE sp_InsertarConcepte_OT
				@IDORDRE int,
				@QUANTITAT int,
				@IDARTICLE int,
				@AMPLE decimal(8,4),
				@ALT decimal(8,4),
				@IMPORT decimal(8,4) 

AS
BEGIN
	SET NOCOUNT ON

	DECLARE @IDCONCEPTE int = NEXT VALUE FOR SEQ_CONCEPTE_OT;
	
INSERT INTO dbo.CONCEPTE_OT
           (IDCONCEPTE,
            IDORDRE,
            QUANTITAT,
            IDARTICLE,
            AMPLE,
		    ALT,
		    IMPORT)
     VALUES
           (@IDCONCEPTE, 
		    @IDORDRE,
            @QUANTITAT,
            @IDARTICLE,
            @AMPLE,
			@ALT,
			@IMPORT)
	END
GO

